﻿using Microsoft.EntityFrameworkCore.Design.Internal;
using Microsoft.Extensions.Logging;

namespace Quick.EntityFrameworkCore;

public class OperationLogger : IOperationReporter
{
    protected virtual ILogger _logger { get; set; }

    public OperationLogger(ILogger logger)
    {
        _logger = logger;
    }

    public void WriteError(string message)
        => _logger.LogError(message);

    public void WriteInformation(string message)
        => _logger.LogInformation(message);

    public void WriteVerbose(string message)
        => _logger.LogTrace(message);

    public void WriteWarning(string message)
        => _logger.LogWarning(message);
}
